package com.gonsin.gview.logic.validate;

import com.gonsin.gview.annotations.enums.ButtonAction;
import com.gonsin.gview.logic.exceptions.BaseGViewException;
import com.gonsin.gview.logic.services.GViewActionServiceImpl;
import com.gonsin.gview.logic.services.GViewCoreServiceImpl;
import com.gonsin.gview.logic.services.GViewDataServiceImpl;
import com.gonsin.gview.model.GButtonModel;
import com.gonsin.gview.model.form.GFormBoardModel;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 针对Form表单模板的格式校验
 */
public class FormModelValidate implements IModelValidate<GFormBoardModel>{


    @Override
    public void validate(ValidateContext context, GFormBoardModel board) {
        ButtonValidate buttonValidate = new ButtonValidate();
        buttonValidate.validate(context, board.getOkButton());
        buttonValidate.validate(context, board.getCancelButton());

    }
}
